package com.android.aircondition.common;

import android.app.Activity;
import android.content.Intent;
import android.view.View;
import android.view.View.OnClickListener;

/**
  * click listener for the tabs of direction bar
  */
public class onMenuChangedListener implements OnClickListener{	
		
		private Activity activity;
		
		public onMenuChangedListener(Activity activity) {
			this.activity = activity;
		}
		
		public void onClick(View v) {
			Intent intent = new Intent();
			
//			switch (v.getId()) {
//			case R.id.Direction_tab_mode:
//				if(activity instanceof HomeActivity){
//					return;
//				}
//				intent.setClass(this.activity, HomeActivity.class);
//				break;
//			
//			case R.id.Direction_tab_temperature:
//				if(activity instanceof TemperatureActivity){
//					return;
//				}
//				intent.setClass(this.activity, TemperatureActivity.class);
//				break;
//								
//			case R.id.Direction_tab_timer:
//				if(activity instanceof TimerActivity){
//					return;
//				}
//				intent.setClass(activity, TimerActivity.class);
//				break;
//			case R.id.Direction_tab_surround:
//				if(activity instanceof SurroundingActivity){
//					return;
//				}
//				intent.setClass(activity, SurroundingActivity.class);
//				break;
//			case R.id.Direction_tab_diy:
//				if(activity instanceof DIYActivity){
//					return;
//				}
//				intent.setClass(activity, DIYActivity.class);
//				break;
//			case R.id.Direction_tab_pmv:
//				if(activity instanceof PMVActivity){
//					return;
//				}
//				intent.setClass(activity, PMVActivity.class);
//				break;
//			case R.id.Direction_tab_setting:
//				if(activity instanceof SettingActivity){
//					return;
//				}
//				intent.setClass(activity, SettingActivity.class);
//				break;
//
//
//			default:
//				break;
//			}
			
			activity.startActivity(intent);
			activity.finish();
		}
		
	}